Method and system of routing network-based data using frame address notification

ABSTRACT

A method and system for routing network-based data arranged in frames is disclosed. A host processor analyzes transferred bursts of data and initiates an address and look up algorithm for dispatching the frame to a desired destination. A shared system memory existing between a network device, e.g., an HDLC controller, working in conjunction with the host processor, receives data, including any preselected address fields. The network device includes a plurality of ports. Each port includes a FIFO receive memory for receiving at least a first portion of a frame. The first portion of the frame includes data having the preselected address fields. A direct memory access unit transfers a burst of data from the FIFO receive memory to the shared system memory. A communications processor selects the amount of data to be transferred from the FIFO receive memory based on the desired address fields to be analyzed by the host processor.

This application is a continuation of Ser. No. 09/163,925 filed on Sep.30, 1998 now U.S. Pat. No. 7,046,625, the disclosure of which is herebyincorporated by reference in its entirety.

FIELD OF THE INVENTION

This invention relates to controlling data flow in a data communicationsnetwork, and more particularly, to the routing of data by readingaddress fields in hierarchal data structures.

BACKGROUND OF THE INVENTION

Data networks have become increasingly important in day-to-dayactivities and business applications. Most of these networks are apacket-switched network, such as the Internet, which uses a TransmissionControl Protocol (TCP) and an Internet Protocol (IP), frequentlyreferred to as TCP/IP. The Transmission Control Protocol manages thereliable reception and transmission of network traffic, while theInternet Protocol is responsible for routing to ensure that packets aresent to a correct destination.

In a typical network, a mesh of transmission links are provided, as wellas switching nodes and end nodes. End nodes typically ensure that anypacket is received and transmitted on the correct outgoing link to reachits destination. The switching nodes are typically referred to as packetswitches, or routers, or intermediate systems. The sources anddestinations in data traffic (the end nodes) can be referred to as hostsand end systems. These hosts and end systems typically are the personalcomputers, work stations and other terminals.

To help move information between computers, the open systeminterconnection (OSI) model has been developed. Each problem of movinginformation between computers is represented by a layer in the model,and thus, establishes a framework for standards. Two systems communicateonly between layers in a protocol stack. However, it is desirable tocommunicate with a pure layer in the other system, and to achieve suchresults, information is exchanged by means of protocol data units(PDUs), also known as packets. The PDUs include headers that containcontrol information, such as addresses, as well as data. At a source,each layer adds its own header, as is well known to those skilled in theart. The seven layers, starting at the physical layer, include: (1)physical; (2) data link; (3) network; (4) transport; (5) session; (6)presentation; and (7) application layers.

The network systems typically use routers that can determine optimumpaths, by using routing algorithms. The routers also switch packetsarriving at an input port to an output port based on the routing pathfor each packet. The routing algorithms (or routing protocols) are usedto initialize and maintain routing tables that consist of entries thatpoint to a next router to send a packet with a given destinationaddress. Typically, fixed costs are assigned to each link in the networkand the cost reflects link bandwidth and/or costs. The least cost pathscan be determined by a router after it exchanges network topology andlink cost information with other routers.

The two lower layers, the physical and data link layers, are typicallygoverned by a standard for local area networks developed by the IEEE 802Committee. The data link layer is typically divided into two sublayers,the logical link control (LLC) sublayer, which defines functions such asframing, flow control, error control and addressing. The LLC protocol isa modification of the HDLC protocol. A medium access control (MAC)sublayer controls transmission access to a common medium.

High-level data link control (HDLC) is a communications controlprocedure for checking the accuracy of data transfer operations betweenremote devices, in which data is transferred in units known as frames,and in which procedures exist for checking the sequence of frames, andfor detecting errors due to bits being lost or inverted during transferoperations. There are also functions which control the set-up andtermination of the data link. In HDLC, the bit synchronous datacommunication across a transmission link is controlled. HDLC is includedin the ITU packet-switching interface standard known as X.25.

Programmable HDLC protocol controllers are commonly used in thesesystems. An HDLC controller is a computer peripheral-interface devicewhich supports the International Standards Organization (ISO)high-level-data-link-control (HDLC). It reduces the central processingunit or microprocessor unit (MPU) software by supporting a frame-levelinstruction set and by hardware implementation of the low-level tasksassociated with frame assembly-disassembly and data integrity.

Most communication protocols are bit-oriented, code-dependent, and idealfor full duplex communication. Some common applications includeterminal-to-terminal, terminal-to-MPU, MPU-to-MPU, satellitecommunication, packet switching, and other high-speed data links.

A communication controller relieves a central MPU of many of the tasksassociated with constructing and receiving frames. A frame (sometimesreferred to as a packet) is a single communication element which can beused for both link-control and data-transfer purposes.

Most controllers include a direct memory access (DMA) device or functionwhich provides access to an external shared memory resource. Thecontroller allows either DMA or non-DMA data transfers. The controlleraccepts a command from the MPU, executes the command, and provides aninterrupt and result back to the MPU.

Typically, when a packet comes into the receive memory, typically afirst-in/first-out (FIFO) memory, there would be bursts of data, whichcontinued until the packet was reassembled into external memory, such asa shared system memory. An interrupt would issue to the host processor,telling the host processor that a packet was available for examination.This type of scheme is classically referred to as store and forward (SF)architecture. The host device is obligated to wait until the entireframe has been read off the wire and ownership of the associatedexternal memory buffer has been reassigned before routing can takeplace. As the length of a frame increases, then so does the latency ofthe routing process. Performance becomes difficult to predict becausethe host is denied knowledge of the length of incoming frames, eventhough this information is contained in the header of every frame. Asthe length of a packet (or frame) increases, there is a delay. The timethat the host gets to the frame is in some sense dependent on the lengthof the packet. If one wants to build a fast system, it is desirable todecouple length and time.

A competing scheme is known as “cut through” (C/T). In this type ofsystem, fragments of a packet or frame are moved into the external hostmemory, i.e., the shared system memory. The host processor is able tolook at that portion of data, e.g., frame, at any time. For example, theprocessor looks at what exit port the packet should be moved, andinitiates an address look up with the appropriate look-up algorithm. Aslong as the address fields are available, then the “cut through”architecture is available. Frames move from receive ports to transmitports in constant bursts without the processor examining the contents.This process expedites movement, but at the cost of replicating erroredframes across networks. Often, due to contention, or the convergence ofmultiple frames to the same destination port, cut-through develops backinto store-and-forward because of the necessity to buffer waitingframes.

Overall, this was thought to be advantageous because the host processorwould not have to wait until the end of the frame came in, but may stillhave part of the frame at the sending station. A problem, however, isthat any problem on the wire could cause a malfunctioning or corruptframe to occur. Thus, corrupt or bad frames would be propagated on thenetwork.

SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide a hybridoption between a store and forward architecture and a cut througharchitecture.

It is still another object of the present invention to provide a methodand apparatus of routing network-based data that improves over a cutthrough system where frames are moved from received ports to transportports in constant bursts.

The present invention now allows an advantage over both store andforward (SF) architecture and cut through (C/T) architecture. Inaccordance with the present invention, the method routes the data frameand comprises the steps of receiving at least a first portion of a framewithin a FIFO receive memory of a network device. The first portion ofthe received frame includes data having preselected address fields. Themethod also comprises the step of transferring a burst of data,including the preselected address fields, from the FIFO receive memoryto an external shared system memory. An interrupt signal is generated toa host processor indicative of the preselected address fields present inthe memory. An address and look up algorithm is initiated within thehost processor to determine frame routing based on the preselectedaddress fields.

The method also comprises the step of transferring data from the FIFOreceive memory through a direct memory access unit of the networkdevice. An interrupt signal can be generated to the host processor afterthe direct access memory unit has transferred data to the shared systemmemory.

The amount of data to be transferred can be selected from the FIFOreceive memory based on the desired address fields to be analyzed by thehost processor. The method can also include the step of receiving thebalance of the frame completely within the shared system memory. Also,an end-of-frame interrupt can be generated when a frame has beencompletely received within the shared system memory. A start-of-packetinterrupt can be generated to a communications processor within thenetwork device when the data received within the FIFO receive memory hasreached a watermark value.

Additionally, a command can be issued to the direct memory access unitof the network device to transfer data from the FIFO receive memory tothe shared system memory after the communications processor has receivedthe start-of-packet interrupt. The method can further comprise the stepof arbitrating the use of a system bus between the direct memory accessunit and a bus arbitration unit. Frame routing can then be determined byinitiating an address and look up algorithm based on the preselectedaddress fields.

In accordance with the present invention, a system for routingnetwork-based data, such as frames, includes a host processor foranalyzing transferred bursts of data and initiating an address and lookup algorithm for dispatching the frame to a desired destination. Ashared system memory receives data, including any preselected addressfields. A network device, such as an HDLC controller, includes aplurality of HDLC ports, and each port includes a FIFO receive memoryfor receiving at least a first portion of a frame. The first portion ofthe frame includes data having preselected address fields. A directmemory access unit transfers a burst of data from the FIFO receivememory to the shared system memory. A communications processor selectsthe amount of data to be transferred from the FIFO receive memory basedon the desired address fields to be analyzed by the host processor.

An interrupt bus can be connected between the FIFO receive memory andthe communications processor. The HDLC port having the FIFO receivememory includes an interrupt generator for generating an interrupt tothe communications processor along the bus. A FIFO bus can be connectedbetween the direct memory access unit and the FIFO receive memory inwhich data is transferred from the FIFO receive memory and through thedirect memory access unit to the shared system memory. The controllerbus can be connected between the communications processor and the directmemory access unit through which data transfer commands are issued fromthe communications processor to the direct memory access unit. The FIFOreceive memory has a watermark setting at which the HDLC port issues astart-up-packet interrupt for the communications processor.

BRIEF DESCRIPTION OF THE DRAWINGS

Other objects, features and advantages of the present invention willbecome apparent from the detailed description of the invention whichfollows, when considered in light of the accompanying drawings in which:

FIG. 1 is a high level block diagram of four network devices, shown asnetwork controllers of the present invention, which connect into a32-bit system bus and showing the host system microprocessor, busarbitration logic unit and shared memory subsystem.

FIG. 2 is a high level block diagram of a network controller of thepresent invention and showing four ports, a communications processor anda system bus interface control unit.

FIG. 3 is a high level block diagram of the buffer management and systemmemory used by an apparatus and the network controller of the presentinvention and showing the various descriptor rings.

FIG. 4 is a high level block diagram of the data structure and systemmemory showing the administration block, descriptor ring and frame databuffer.

FIG. 5 is a high level block diagram of a descriptor and buffer.

FIG. 6 is a high level block diagram of the timer operation of thenetwork controller of the present invention.

FIG. 7 shows details of the administration block and system memory usedin the present invention.

FIG. 8 shows a block diagram and chart of the administration block,statistics images and system memory of the present invention.

FIG. 8A is a table showing various bit values and descriptions for aprimitive command register of the direct memory access unit used in thepresent invention.

FIG. 8B is a table showing various bit values and descriptions for amaster interrupt register of the direct memory access unit used in thepresent invention.

FIG. 9 is a block diagram showing the hierarchical configuration ofvarious headers as an example of layering.

FIG. 10 is a block diagram showing an 802.3 data link layer header.

FIG. 11 is a block diagram showing an Internet IP header.

FIG. 12 is a block diagram showing a TCP header.

FIGS. 13-20 each show a high level block diagram of the basic componentsof the network controller and the external host processor, busarbitration logic unit and shared system memory, and showing in detailthe sequence of steps for the frame address notification of the presentinvention.

FIG. 21 is a general timing diagram showing generally the transmitinterrupt event timeline of the frame address notification of thepresent invention.

FIG. 22 is a basic block diagram showing a comparison of a classicfirst-in/first-out flow-control versus a flow control using a look-aheadwatermark of the present invention.

FIG. 23 is a flow chart illustrating the process of using a look-aheadwatermark of the present invention.

FIG. 24 a is a timing diagram showing an interrupt-mediated frametransmission.

FIG. 24 b is a timing diagram showing a look-ahead watermark-mediatedframe transmission.

FIG. 25 illustrates a graph explaining how a watermark value has aninverse effect on the total number of generated interrupts.

FIG. 26 is a flow chart illustrating the basic process of using an earlycongestion notification signal of the present invention.

FIGS. 27A-G illustrate a high level block diagram of how thefirst-in/first-out memory overflows on a second packet into a receiveFIFO memory and the various read and write status pointers.

FIGS. 28-43 are high level block diagrams of the external hostprocessor, bus arbitration logic unit and shared memory, and basiccomponents of the network controller of the present invention, andshowing the process when an early congestion notification signal is usedfor three different incoming packets with an overflow on the thirdpacket.

FIG. 44 is a graph showing in detail estimated traffic composition ofthe host bus with the use of regular descriptors and the“fence-posting,” when only the first and last descriptors are updated.

FIG. 45 is a chart showing the primitive signaling between the hostsystem and network device, e.g., the network controller, of the presentinvention.

FIG. 46 is a flow chart describing the process of building descriptorswithin the network device.

FIGS. 47-50 are tables showing the various fields of the receive andtransmit message descriptors.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention will now be described more fully hereinafter withreference to the accompanying drawings, in which preferred embodimentsof the invention are shown. This invention may, however, be embodied inmany different forms and should not be construed as limited to theembodiments set forth herein. Rather, these embodiments are provided sothat this disclosure will be thorough and complete, and will fullyconvey the scope of the invention to those skilled in the art. Likenumbers refer to like elements throughout.

Referring now to FIGS. 1-3, and more particularly to FIGS. 1 and 2,there is illustrated a high level diagram of a network controller andhost system that are exemplary of the present invention. The networkcontroller is an HDLC controller in one specific embodiment of theinvention.

The present invention can be used in a number of different networks,including a conventional network making use of network controllers. Forexample, the invention could be used in many local area networks wherecomputers are connected by a cable that runs from interface card tointerface card. A wiring hub could provide a central point for cablesattached to each network interface card. Hubs could connect connectorssuch as coaxial, fiber optic and twisted pair wire. One type ofconfiguration could use unshielded twisted pair wire known as ten base Tbecause it uses 10 megabits per second (NBPS) signaling speed, directcurrent, or base band, signaling and twisted pair wire.

The network could typically include routers, such as those that examinedestination addresses contained in Net Ware IPX protocol. The routerswould strip off the Internet packet, ring frame or other information andcould send an IPX packet and any of its encapsulated data across a link.Any bridges could examine the address of each Internet packet and sentit across the circuit.

FIG. 1 illustrates a typical high level system diagram, which isillustrative of the general method, apparatus and system of the presentinvention. As illustrated, four network controllers 40, also known asnetwork devices, connect into a 32-bit system bus 42, which is connectedto host system 43. A host microprocessor 44 connects to the system bus42, as does the shared memory subsystem 46. Each controller 40 has fourports, 50, 52, 54 and 56, that connect to respective high-level datalink control layers, full duplex protocol lines 58.

Each network controller 40 is a high performance, four port, high speednetwork controller designed for use in next generation bridge and routerequipment, as well as any equipment requiring HDLC operation at T3speeds. Each network controller is preferably manufactured as a singlechip.

As shown in FIG. 2, on the network side, the network controller 40contains four ports as noted before, numbered 0 to 3, 50, 52, 54 and 56,each with separate transmit and receive FIFOs allowing half or fullduplex operation. Each port 50-56 has a transmit data handler 60 thatreceives transmit clock signals (TCLK) and forwards data signals (TData) to line transceivers 62. The receive data handler 64 also receivesclock signals (RCLK) and sends data to and from the line transceivers62. The ports also each include the illustrated transmit and receiveFirst-In/First-Out (FIFO) logic circuits 66,68; the 512 byte transmitFIFO 70, control circuit 74, and the 512 byte receive FIFO 72. The 512byte FIFOs 70,72 connect to the frame bus 76 and the control circuit 74connects to the management bus 78. The FIFO logic circuits 66,68, anddata handler 60,64 and the control 74 work as appropriate transmit andreceive circuitry for the transmit and receive (Tx), (Rx) 512 byteFIFOs.

On the system side, the controller 40 has a high speed (from 25 to 33MHZ), 32-bit system bus interface control unit (SBI) 80 which usessingle cycle word transfers to minimize the controller's system bususage and maximize its performance. The direct memory access unit (DMA)operation enables the device to become a bus master, and can use anefficient buffer management algorithm for store-and-forwardapplications. The system bus interface control unit 80 includes theshared bus interface circuitry 82, bus slave controller 84, DMA busmaster controller, also DMA controller, or direct memory access unit 85,the configuration data transfer engine 86, management data transferengine 88 (which both communicate to the management bus 78), and framedata transfer engine 90, which communicates to the frame bus 76.

Although not directly accessible by the user, the network controlleralso contains an embedded 32-bit RISC processor called theCommunications Processor Core or simply communications processor (CPC)92. The CPC handles such activities as gathering the per portstatistics, DMA mode buffer management and data transfers, chipself-test and host/chip primitive command/response exchanges. The CPC 92contains a CPU 94, ALU 96, timers 98, RAM 100, firmware ROM 102, andinterrupt handler 104.

Internal buses tie all of the controller's subsystems together tosupport management and frame data transfers in an efficient manner.Separate buses, as well as the management bus 78 and frame bus 76, areused for respective management data and frame data to increaseparallelism and thereby increase performance. The controller 40 isformed on a chip by means known to those skilled in the art.

Designed for store-and-forward applications, the network controller 40uses an on-chip DMA engine and an efficient buffer management algorithmto transfer frames between system memory and the eight on-chip 512 byteFIFOs 70,74 via the 32-bit data or frame bus 42. In this operation, thecontroller 40 negotiates to become a bus master, takes ownership of thesystem bus, and then directly moves frame and administration databetween the chip and system memory 46. The host processor 44 candirectly access the controller's on-chip configuration/status registersby using the same bus operating in a bus slave mode.

The communications processor 92 uses a Harvard-type architecture withseparate program and data buses, which support concurrent datatransactions. A four stage pipelined control unit is used to effectivelyexecute one instruction per clock cycle, as typical. To provide the highperformance required by this architecture, the internal SRAM 100 used bythe communications processor could have three ports, and is typicallyreferred to as a Tri-Port RAM (TPR). The use of this architecture couldallow a read from one register (or TPR), an ALU operation, and a writeto a different register or TPR location, to all occur within the sameclock cycle with one instruction.

A firmware program which controls the operation of the controller(including buffer management and data transfers, chip self-test andhost/chip primitive command/response exchanges, and statisticsgathering) is contained in the ROM 102, which could be an on-chip 8KROM.

The network controller 40 uses a phase locked loop (PLL) to generate aninternal system clock from the externally provided system clock. ThisPLL generated system clock is delayed in time so as to minimize thesignal to system clock delays which can impact performance.Consequently, the controller system clock must be 25 or 33 MHZ.

For purposes of understanding, a broad overview of operation is given,while referring to FIGS. 1-8, followed by greater details of operationwith reference to subsequent drawings. Once the controller has beeninitialized and the ports are up and running, a typical frame receptionproceeds as follows. The binary 01111110 pattern of the opening flag ofthe frame is detected by the HDLC port receiver circuitry, whichincludes the Rx FIFO logic 68, Rx data handler 64 and line transceivers62. This serial, digital data stream flows to the HDLC port's receivercircuitry where a search for the start-of-frame (a non-flag pattern) isperformed to establish the octet alignment and beginning of the frame.Frame check sequence (FCS) calculation begins on the first octet afterthe actual frame.

A serial to 32-bit parallel word conversion is performed by the receivercircuitry and the data words are stored in the receiver (Rx) FIFO 74.Assuming the Rx FIFO 74 was empty at the start of this scenario, receivedata continues to fill the receive FIFO 74 until the number of wordstherein is greater than the programmed watermark setting. As will beexplained in greater detail below, at this point, an interrupt is issuedto the firmware 102 running on the on-chip RISC 92 requesting a datatransfer for the receive FIFO 74. This interrupt is internal to thenetwork controller 40 and is not visible to the host system 44.

Upon receipt of the interrupt, the firmware 102 checks its on-chip copyof a current receive descriptor (fetched previously) for the requestingport. If it does not have ownership of a buffer, it will direct theon-chip DMA to refetch the appropriate descriptor for examination. Thecontroller 40 will repeatedly fetch the descriptor until one of twoevents occur: (1) it is given ownership of the buffer, or (2) thereceive FIFO overflows (the frame is lost in this case). Once bufferownership is granted, the firmware responds to the interrupt bydirecting the DMA to transfer a burst-size of frame data words from thereceive (Rx) FIFO 74 to a receive buffer in system memory. Upon transferof the first burst of the received frame to system memory, a FAN (FrameAddress Notification) interrupt may then be generated to the host via aMaster Interrupt Register (MIR).

A cycle of receive FIFO 74 filling (by the network controller receivercircuitry), receiver-to-firmware interrupts, and FIFO emptying (by theDMA) continues until the end of the frame is encountered by the receivercircuitry. At this point, the frame check sequence (FCS) of the frame ischecked by the receiver circuitry and a receive status word is generatedand appended behind the frame in the receive FIFO 74.Receiver-to-firmware interrupts continue until the remainder of theframe and the receive status word have been transferred to the receivebuffer in system memory, as explained below. The firmware uses theon-chip DMA 85 to update ownership, message size, error flags, etc. inthe receive descriptor and then issues a “Frame Received” interrupt(RINT) to the host via the Master Interrupt Register (MIR) (FIG. 8B)indicating a completed reception.

A typical frame transmission takes place as follows. All frames aretransmitted by the network controller 40 from transmit frame databuffers 204 assigned to entries in a transmit descriptor ring 202 (FIG.3). When the system is ready for the network controller 40 to transmit aframe, it relinquishes ownership of the associated transmitdescriptor(s) and then does one of two things: (1) waits for thecontroller's transmit poll timer to expire causing the chip to poll theTx descriptor in search of a buffer it owns, or (2) is issued a TransmitDemand (TDMD) via the System Mode Register (SMR) by the host. In eithercase, the firmware instructs the DMA to begin fetching burst-sizeamounts of frame data from the buffer and placing it in the appropriateport's transmit FIFO. This will continue until the FIFO is filled abovethe programmed watermark or until the end of the frame is encountered.

Once enough words to satisfy the programmed transmit start point are inthe transmit FIFO 70, the transmitter circuitry, which includes thetransmit data handler 60, transmit FIFO logic 66, and line transceivers62 initiates the transmission. The transmitter circuitry performs aparallel to serial conversion sending a continuous serial data stream.Opening flag(s) are sent followed by the frame data and then the CycleRedundancy Check (CRC) or FCS for the frame. Frame Check Sequence (FCS)calculation starts with the first octet of the frame. As the transmitFIFO 70 empties below a watermark setting, the transmitter circuitryissues a private interrupt to the on-chip firmware 102 requesting moredata be copied from system memory.

A cycle of emptying (by the transmitter unit) and filled (by the DMA)continues until the end of frame (EOF) has been written into the FIFO.When the transmitter removes the last data of the frame from thetransmit FIFO, it optionally appends the FCS it has calculated (FCSappending by controller can be controlled on a frame by frame basis).The transmitter closes the frame by sending a closing flag(s).

The embedded processor 92 inside the network controller 40 maintains 12statistics in registers on-chip for the host system to use. Thesestatistics are accessed by the host using a bus-slaveconfiguration/status register operation. As an additional feature, thecontroller can be requested to use its on-chip DMA to place a full copyof the on-chip statistics in system memory as will be explained below.

The system bus interface unit (SBI) 80 performs three key functions inDMA mode: (1) DMA engine for HDLC frame data transfers (bus master); (2)microprocessor port for access to configuration/status registers (busslave); (3) and source for preferably two interrupts pins (MINTR# andPEINTR#). Both bus master and bus slave operations utilize the same32-bit data bus and share some of the same control signals. There wouldbe separate pins to select a proper mode for bus slave operations (CBIG)and bus master operations (DBIG).

The system bus interface unit (SBI) 80 contains-the multi-channel DMAunit 85 for performing block data transfers with system memory 46 via ashared bus 42 without the involvement of the host processor 44. Thecontroller requests ownership of the system bus whenever it has need toaccess an administration block 200, a transmit or receive descriptor206, or a transmit or receive frame data buffer 204, as will beexplained below with reference to FIG. 3.

Each time the network controller 40 accesses one of these datastructures, it negotiates for bus ownership, transfers data (this may beseveral words), and then relinquishes bus ownership. For a given busownership, only sequential addresses are accessed. The size of each bustransaction (the number of words transferred or “burst size”) can varyand is programmable for frame data transfers and statistics dumps.Administration block 200 and descriptor transfer size is determined bythe network controller 40 on an as-need basis, and can range from one tothirty-two consecutive words. The DMA unit 85 inside the system businterface unit 80 provides the necessary timing for single cycle accessin order to minimize system bus utilization by the controller.

Configuration/status register access to the network controller 40 couldbe done using the same 32-bit data bus that is used for DMA transfers.For this reason, register accesses cannot be performed when thecontroller is the bus master. Configuration/status (“config” for short)operation is designed to work with most popular microprocessors. Alllocations inside the network controller could be implemented as 32-bitregisters. All configuration and status registers, along with all of thenetwork statistics, could be accessed via this interface.

Referring now to FIG. 4, operation of the controller of the presentinvention involves three important system memory data structures: (1)administration block 200; (2) descriptor rings 202 with descriptors 206;and (3) frame data buffers 204. For any given application, oneadministration block 200, eight descriptor rings 202 (FIG. 3) andmultiple frame data buffers 204 are used. There is one descriptor ring202 for each FIFO 70,72 at each port as illustrated in FIG. 3. Beforeinitializing the controller 40, the host 44 is expected to allocate andconfigure these data structures in system memory. The administrationblock 200 is used for chip initialization and as an exchange point fornetwork statistics maintained by the controller.

Each descriptor ring 202 is a circular queue with entries or descriptors206 containing pointers and information for frame data buffers 204 as isknown to those skilled in the art. Examples of devices and systemsshowing the use of descriptors and descriptor rings are disclosed inU.S. Pat. Nos. 5,299,313 and 5,136,582, the disclosures which are herebyincorporated by reference. Each descriptor ring 202 is dedicated to aspecific FIFO 70,72 within the controller 40 and each two-worddescriptor entry 206 within a ring is associated with one specific framedata buffer 204 in system memory (FIG. 5). Data buffers are defined asblocks of memory (typically ranging from 512 to 2,048 bytes) containingframes for transmission or providing space for frame reception.

As part of the initialization of the controller 40, the host must setaside a section of system memory. This memory is used to hold buffermanagement pointers, configuration information and per port networkstatistics. Since the administration block 200 can be updatedperiodically with statistics and can be referenced by the controller 42,it must remain an active allocation of memory throughout the operationof the device.

The administration block 200 (also called initialization block) consistsof 512, contiguous bytes, and is word-aligned in memory. FIG. 7illustrates greater details of the administration block 200 and itsdetails. The first 15 words 200 a of the administration block containinformation used for chip initialization. The controller always refersto an on-chip copy of this section unless instructed to fetch part orall from shared system memory 46 again. The initialization section 200 aof the administration block 200 contains system memory pointers to theeight descriptor rings 202, and set up information for six on-chiptimers and nine DMA bus master burst sizes (maximum number of wordstransferred for various types of data per bus ownership).

The next contiguous four words 200 b can be used by the host 43 todefine the geometry of the descriptor rings 202 and associated framedata buffer dimensions in external shared memory 46, as will beexplained below. The controller 40 can automatically construct the(transmit) TX and (receive) RX descriptor rings 202 (FIG. 3).

The remaining words 200 c of the administration block 200 provide spacefor the controller 40 to copy images of its on-chip HDLC framestatistics into shared system memory 46 when instructed to do so by theappropriate primitive. These periodic statistics snapshots are for thesystem to use. Allocation of these words of the administration block 200is not required if the statistics dump feature is not used.

After chip reset is complete, once a reset-in-progress pin has goneinactive, the initialization procedure can begin as shown in FIGS. 45and 46, and explained in greater detail below with reference to SectionV. First, the host sets up the admin block 200, descriptor rings 202 andframe data buffers 204 in system memory. Second, the host 44 writes thestarting system address of the administration block 200 to a registerinside the controller 40 called a “Pointer to the Administration Block”(PAB), and optionally enables primitive interrupts. Next, an interrupt(INT) primitive is issued by the host 44 to the network controller. Thiscauses the controller to copy the first 32 words (FIG. 7) of theadministration block 200 into the chip of the network controller forprocessing. The network controller then responds with an acknowledgmentINIT_COMPLETE or ACK (INIT) primitive interrupt to the host. At thispoint, the host 44 is free to housekeep or configure all of thecontroller's registers, establishing modes of operation for each HDLCport, enabling transmitters and receivers, and enabling and maskingvarious interrupts. As further shown in FIG. 45, when finished, the hostissues a START primitive to the network controller 40 to initiate normaloperation. The START primitive causes the controller to prefetch thefirst two descriptors in each of the eight transmit and receivedescriptor rings and prepare for frame transfers.

The first eight entries in the administration block 200 are systemaddresses which act as pointers to the top of each descriptor ring 202(FIG. 3). Since the descriptors 206 must be word-aligned (orbyte-aligned) in memory, these pointers should always be programmed withzeros in the least significant two address bits (the byte address). Inother words, all descriptor ring pointers should be evenly divisible byfour. Unpredictable operation will results from non-aligned descriptorring pointer addresses. The network controller 40 refers to its copy ofthese pointers once the INIT primitive is completed, changing thepointers in system memory after the INIT has no effect unless anotherINIT is performed or a refresh descriptor ring primitive is issued.

As noted before, each transmit channel and each receive channel withineach port 50,52,54 and 56 uses a dedicated descriptor ring 202 for atotal of eight rings (one transmit ring and one receive ring per port)(FIGS. 3 and 4). A descriptor ring 202 (FIG. 4) is a circular queuecomprising of several two-word entries called “descriptors 206”. Eachdescriptor entry 206 describes one frame data buffer 204. The first word208 of a descriptor 206 entry contains information about its frame databuffer 204 and the frame, or partial frame, that the frame data buffercontains (FIG. 5). The second word 210 of a descriptor 206 entry is asystem address, a pointer to the top of its associated frame databuffer. Descriptor rings 202 can range in size from 1 to 8K entries. Thenetwork controller 40 is given a pointer to the top of each ring in theadministration block 200 at initialization. Descriptor entries 206 arealways accessed sequentially starting at the top of the ring. The lastdescriptor in a descriptor ring 202 contains a flag marking the end ofthe ring. The controller returns or wraps to the first entry in the ringwhenever it encounters an end-of-ring flag.

An ownership bit (OB) 212 in the first word of each descriptor 206indicates whether the host or the controller owns the associated framedata buffer. Ownership follows a specific protocol that must be adheredto by the controller and the host. The rule is simple: once ownership ofa descriptor 206 has been relinquished to the other part, no part of thedescriptor or its associated buffer may be altered. The host gives thecontroller ownership of empty buffers for frame reception and full framedata buffers for frame transmission. Conversely, the network controllerpasses ownership back to the host for transmit buffers it has used andreceives buffers it has filled.

For frame reception on any given port, the host 44 is required toprovide the controller 40 with ownership of contiguous descriptorspointing to empty frame data buffers 204. After the very first words ofthe frame have been transferred to memory 46, a Frame AddressNotification (FAN) interrupt is issued (FIGS. 13-21 explained below ingreater detail in Section I). Once a frame is fully received by thecontroller, ownership of its constituent descriptors is then reassigned.The host is signaled regarding this event via an RINT interrupt. Thehost 44 is obligated to read a master interrupt register (MIR) (FIG. 8B)in order to surmise the specific port issuing the signal. Once this isaccomplished, the frame may then be dispatched in some fashion andownership of the relevant descriptors returned to the controller.

In typical operation, the host 44 “follows” the network controller 40around the descriptor ring 202 leaving “empty” buffer descriptors 206 inits wake for the network controller 40 to use. If the network controller40 gets too far ahead of the host 44, it can wrap around the descriptorring 202 and encounter descriptors 206 it does not own. Incoming framesmay be lost if this occurs. The host is informed of any receive FIFO 70overflows via an Early Congestion Notification (ECN) interrupt (FIGS.26-43 explained in greater detail below with reference to Section III).The host may then react to alter its behavior in order to avoidadditional lost frames.

For frame transmissions on a given port, the network controller 40“follows” the host 44 around a transmit descriptor ring 202 leaving usedbuffer descriptors in its wake for the host to reclaim. The host onlygives the controller 40 ownership of descriptors 206 when it has one ormore frames ready for transmission. Once a frame is fully transmitted bythe controller, ownership of its constituent descriptors 206 is passedback to the host 44 for reuse. The host 44 is signaled regarding thisevent via a TINT interrupt.

In some applications, the host 44 may elect to use frame data buffers206 which are smaller in size than the frames received or transmitted. Asingle frame spans multiple buffers. This allows frames to be dissected(scattered on reception) or assembled (gathered on transmission) by thenetwork controller 40. Multiple data buffers can hold the constituentpieces of a frame by “chaining” the associated descriptors 206 together.By definition, chained descriptors are consecutive entries in adescriptor ring with the end-of-frame (EOF) flag 214 set in theterminating descriptor of the chain. In other words, the buffer of adescriptor entry, which is owned but whose end-of-frame flag is not set,is considered to be part of a frame, not an entire frame.

During reception of a large frame, the network controller 40 chainsdescriptors 206 together one by one as it completely fills each framedata buffer 204. When the end of frame is received and transferred tosystem memory, the end-of-frame flag (EOF) is set in the terminaldescriptor of the chain. During transmission, the network controller 40is able to sequentially construct a single frame from the contents ofchained buffers. Transmission of the frame terminates only when itencounters a buffer whose descriptor has set the end-of-frame flag.

The network controller 40 optimizes bus utilization whenever three ormore frame data buffers are chained together by updating the first andlast descriptor entries involved (FIG. 4). When the network controller40 is finished with the buffers involved in a chained frame, it firstreturns ownership of the last descriptor and then it returns ownershipof the first descriptor. These are the “fence posts” of the frame (FIG.44 and Section IV below). The host 44 assumes ownership of all theintervening frame data buffers even though they are owned by thecontroller. Hence, whenever the host encounters a host-owned descriptornot marked by the end-of-frame flag, it should assume ownership of allsuccessive descriptors up to and including the next host-owneddescriptor with the end-of-frame flag set.

All of the flags and fields of the first and last descriptor in a“fence-posted” chain are updated by the controller 40 to provideaccurate information about a frame once it has been fully transmitted orreceived. The first word 208 of the descriptor 206 also includes abuffer size 216 and message size 218. For receive frames, the messagesize 218 (MSIZE) field of the first descriptor in the chain is updatedwith the byte count of the entire frame, not simply the byte count ofthe associated frame data buffer (since this is equal to the buffersize). However, the message size field 218 of the terminal descriptorwill contain only the actual number of bytes occupied by frame data inits associated buffer. This allows the host to easily locate the receivestatus word stored in the first complete word following the frame datain the buffer (note that the four bytes of the status word are notincluded in the count stored in the MSIZE fields).

No more than one frame should ever exist in a single frame data buffer204. A single frame can span the frame data buffer 204 of multipledescriptors 206 if they are contiguous in the descriptor ring 202. Thisis called buffer chaining. The network controller 40 should always haveownership of several empty and contiguous receive buffers. The networkcontroller 40 should only be given ownership of transmit buffers thatcontain frames ready for transmission.

Although not required, best performance is achieved when frame databuffers 204 are word aligned in memory and large enough that chaining isnot needed.

In a typical store-and-forward application, the host maintains a “pool”of empty, unallocated frame data buffers 204 in system memory.Assignment of a frame data buffer 204 to a receive descriptor 206effectively removes it from this pool. Once a frame data buffer 204 hasbeen filled, it is reassigned or switched to one or more transmitdescriptors. When transmission is finished, the frame data buffer 204 isreturned to the pool for reuse and the cycle repeats.

The next two words in the administration block 200 after the descriptorring pointers 200 d contain timer reload and control information 200 e.The controller uses a hardware prescale timer 220 (FIG. 6) and divider222 to divide down the UCLK frequency 224. A prescale timer reload value226 is used to adjust the output frequency of the prescale timer.Typically, a prescale reload value is selected to result in a 20millisecond (50 Hz) prescale timer period through faster and slowerperiods are possible. The output of the prescale timer 226 is used asthe base increment frequency for several secondary 8-bit timers 228maintained inside the network controller 40. These secondary timers canbe: statistics dump timer 230, ports 0-3 transmit descriptor poll timers(four) 232-238. Each of the five, 8-bit timers has an associated reloadvalue which is established in the administration block 200. Thefollowing equation shows how to calculate prescale timer reload values.

${{Prescale}\mspace{14mu}{Reload}} = {65.536 - \frac{T_{prescale}}{16 \times T_{UCLK}}}$where T_(prescale) is the desired prescale timer period and T_(UCLK) isthe system clock period.

TABLE 1 Typical Prescale Timer Reload Values f_(UCLK) T_(UCLK) DecimalReload 16-Bit Hex Reload (MHZ) (ns) Value (20 ms) Value (20 ms) 23.8690x5D3D 34.286 0x7EE6The next equation shows how to calculate secondary timer reload values:

${{Secondary}\mspace{14mu}{Reload}} = {265 - \frac{T_{secondary}}{T_{prescale}}}$where: T_(secondary) is the desired secondary timer period andT_(prescale) is the prescale timer period.

TABLE 2 Typical Secondary Timer Reload Values T_(prescale) T_(secondary)Decimal Reload 8-Bit Hex Reload (ms) (seconds) Value Value 0.5 231 0xE71.0 206 0xCE 2.0 156 0x9C 5.0 6 0x06

Each of the secondary timers has a corresponding enable control bitcontained in the timer enables field of the administration block (FIG.7). A “one” enables the timer; a “zero” disables the timer. Thefollowing table shows the bit positions of each of the five secondarytimer enables. The controller refers to its on-chip copy of the enablesonce INIT is completed. Changing the enables in system memory has noeffect unless another INIT is performed or a TIMER_ENABLE primitive isissued (0x0F). The prescale timer is automatically disabled if none ofthe secondary timers are enabled.

TABLE 3 Administration Block Timer Enable Field (1 = enabled; 0 =disabled) Bit: 7 6 5 4 3 2 1 0 Name: Reserved Stats Tx Tx Tx Tx Dump 3Poll 2 Poll 1 Poll 0 Poll

The granularity of the prescale timer 220 permits a wide range of timerresolution. When selecting a prescale timer reload value 226, eachprescale timer expiration consumes a small fraction of the controller'son-chip processing bandwidth. Selecting a very small prescale timerperiod (large reload value) can unintentionally hamper the controller'sability to service incoming and outgoing frames and thereby effectingthe overall performance of the device. It is recommended that theprescale timer not be operated below a one millisecond period (FIG. 6).

When selecting secondary timer reload values for the transmit descriptorpoll timers 232-238, two factors should be considered: (1) the half orfull duplex operating mode of the port; and (2) the expected traffic ona given port, e.g., the percent of available bandwidth that is actuallyused. In general, the greater the traffic, the higher the pollfrequency. Some systems may opt not to use transmit descriptor polling,and instead rely on the transmit demand (TD) bits in the system moderegister (SMR) to initiate frame transmission.

The next two words 200 f in the administration block 200, after thetiming words 200 e, relate to burst size (the four bytes located atPAB+40) (FIG. 7), and indicate the individual burst sizes for DMAtransfer of data to the corresponding transmit ports. The next fourbytes (PAB+44) determine the burst sizes for DMA transfer of frames fromthe corresponding receive ports. The DMA 85 will always transfer data ina burst size determined by the values set in these fields, until theremaining data to be transferred is less than the selected burst size.The controller refers to an on-chip copy of these values once the INITprimitive has been completed. Subsequent changes must be indicated viasubmission of the appropriate primitive command.

Setting the burst and frame buffer sizes equivalent will minimize therequired number of bus transfers per frame and provide improvedperformance, if system constraints will permit large DMA bursts.

A system clock period 200 g is located in byte #1 of PAB+48, shouldcontain the value “0x28” if operating at 25 MHZ or “0x1E” if operatingat the 33 MHZ system clock. The controller refers exclusively to theon-chip copy of this value once the INIT primitive has been completed,changing this value in system memory after INIT has no effect unlessanother INIT is performed.

“N1” is a 16-bit variable that is selectable by the host for the maximumframe size to be received. The N1 values for Ports #0 and #1 are locatedat PAB+52 200 h and for Ports #2 and #3 are located at PAB+56 200 i. TheN1 value would typically be programmed by the host at initialization andcould range anywhere between one byte to 64K bytes. Typically N1 is 2Kbytes or less for most applications. Any received frame that exceeds N1will cause the “Frames Larger Than N1” statistic to be incremented forthat port. The controller 40 refers to an on-chip copy of these valuesonce the INIT primitive is completed, changing these values in systemmemory after INIT has no effect unless another INIT is performed.

The network controller 40 will automatically build the specific transmitand/or receive descriptor rings 202 in shared memory 46, if the valuesof the “Transmit (TX) Ring Size” or “Receive (RX) Ring Size” fields(PAB+60 through PAB+72) 200 b are nonzero. Otherwise, if these fieldsare zero, the controller firmware 102 will not build the associateddescriptor rings, but rather, expects the host 44 to have already builtthese structures in shared memory 46.

A primitive command register (PCR) (FIG. 8A) provides a mechanism forthe host's system software to issue commands/instructions to the networkcontroller 40 internal firmware 102 for processing. Each and every hostprimitive issued (in the lower half of this register) is acknowledged bythe firmware via a provider primitive (in the upper half of thisregister).

A primitive exchange protocol must be followed by both host and firmwarefor the primitive mechanism to work properly. The host must issue oneand only one primitive at a time, waiting for the provider primitiveacknowledgment before issuing another primitive. On the other side, thefirmware will generate one and only one provider primitive for each hostprimitive issued.

A Master Interrupt Register (MIR) (FIG. 8B) records events for reportingto the host processor via a MINTR# pin. The register is roughlyorganized into one byte of interrupt events per HDLC port with somemiscellaneous bits (i.e., PINT, SPURINT, MERR, PPLOST, SERR, HPLOST,WERR) distributed for byte positional consistency.

Other registers not described in detail, such as a Master Interrupt MaskRegister (MIMR) and a Port Error Interrupt Mask Register (PEIMR), allowthe host to select which corresponding MIR and PEIR interrupt eventswill actually generate an interrupt on various pins. These registers donot effect the setting of bits in the MIR and PEIR, they only mask thegeneration of host interrupts as a result of an interrupt bit beingsent.

I. Frame Address Notification (FAN)

Referring now to FIGS. 9-21, there are illustrated further details anddrawings showing the frame address notification (FAN) interrupt thatallows a hybrid option between the classic store and forward (SF)architecture and the cut-through (C/T) architecture. In accordance withthe present invention, the frame address notification (FAN) is aninterrupt signaled to the host processor 44 when all relevant addressfields for a received frame currently reside in shared memory 46. Theframe may then be processed by an address and look-up engine with theappropriate algorithm and look-up table 46 c (FIG. 20) and dispatched tothe proper port and destination. This provides that the pipeliningeffect because routing is permitted to occur in parallel while theremainder of a frame could be incoming off the network wire.

Additionally, by the careful selection of the DMA 85 burst-size, anyappropriate address field can be made available when the initial burstis read of the frame. The MAC-level headers, IP addresses, or even theTCP/UDP ports could be read into memory depending upon the size of theburst. This facilitates L2-L3 or L4 frame switching applications.

FIGS. 9, 10, 11 and 12 illustrate how the TCP/UDP header is encapsulatedin an IP data area and the IP header contained in a MAC data area. FIG.9 gives a good indication of layering. The TCP/UDP data area 240 andTCP/UDP header 240 a, IP data area 242, header 242 a, MAC data area 244and MAC header 244 a are illustrated.

FIG. 10 shows an 802.3 (MAC) data link layer header of 18 bytes, while a20 byte Internet IP header is illustrated in FIG. 11. FIG. 12illustrates a 20 byte TPC header. The appropriate address fields arelisted.

FIGS. 13-20 illustrate the basic process of the method and system ofrouting a data frame in accordance with the present invention. Asillustrated, the network controller 40, labeled as SWIFT, includes thefour HDLC ports 50, 52, 54 and 56, each port including a transmit FIFO70 and receive FIFO 72. The network controller also includes the RISCprocessor, also known as a control processor (CPC) 92, and the directmemory access unit (DMA) 85. A CPC bus 250 interconnects between the CPC92 and the DMA 85 unit. The interrupt bus 252 connects between thevarious HDLC ports and the CPC 92. A FIFO bus 254 interconnects betweenthe DMA and the various HDLC ports.

As shown in FIG. 14, a frame initially enters HDLC port 3 and isreceived in the receive FIFO 72 of the network controller 40. In FIG.14, the frame has reached the watermark, indicated by arrow 258, and theport initiates a start-of-packet (SOP) interrupt (FIG. 15) to the CPC 92via the interrupt bus 252. At this time, the CPC 92 issues a command tothe DMA 85 (FIG. 16) to transfer data, while data from the frame isstill being transferred into the FIFO 72. The DMA 85 issues a query tothe bus arbitration logic unit 47 through the system bus 42, inquiringwhether it can use the system bus (FIG. 17). If the system bus 42 isavailable, the bus arbitration logic unit 47 then enters in theaffirmative with a yes. At the same time, the frame is still beingreceived within the FIFO 72. At this time, the DMA 85 transfers datafrom the FIFO 72 to the shared system memory 46 as shown in FIG. 18. Thefirst burst of this DMA 85, as illustrated in FIG. 18, will then causethe CPC 92 to issue an interrupt signal known as the FAN or frameaddress notification event to the host processor 44 via the system bus42, indicative that the preselected address fields of the frame arepresent in the shared memory 46 (FIG. 19). The amount of the DMA burstsize has been adjusted for the particular headers and addresses thatwill be looked at and for what layers.

As shown in FIG. 20, the host processor 44 then initiates the look upalgorithm and determines how the packet and frame is to be addressed andtransferred. This look up and FAN event can occur even when a frame isstill being received within the frame receive buffer.

An end-of-frame (EOF) interrupt is issued when a frame has beencompletely received within the shared memory 46. Thus, this signifieswhen the host can transfer or finish the transfer process.

FIG. 21 illustrates a timing chart showing the frame addressnotification (FAN) event. As shown at the top with the MAC layer, astart-of-packet shown as P1 is first issued followed by the firmware(FW) instruction to the DMA to build the start-of-packet command withthe receiver. A continuation of packet (COP) command is issued and then,as illustrated, the DMA transfers data. DMA also issues the frameaddress notification and then issues the end-of-packet (EOP). A similarcircumstance occurs with the second packet known as P2 as shown at thetop at the MAC layer.

II. Look-Ahead Watermark

Referring now to FIGS. 22-25, greater details of the look-aheadwatermark used in the present invention is disclosed. The look-aheadwatermark (LAWM) functions as a synchronizing signal where the FIFO(first-in/first-out memory) memory, which includes the transmit andreceive FIFO 70,72 provides a look-ahead watermark (LAWM) to indicatesufficient storage exists to receive one or more additional writebursts. The transmission of frames can be expedited by this techniquebecause it increases the bus and memory resource utilization whilereducing the load on the communications processor 92.

The look-ahead watermark signal implies that the FIFO can accommodate anadditional DMA burst of the indicated quantity. The DMA burst size isnot required to be the same size as the look-ahead watermark-mediatedburst. The look-ahead watermark functions more as a “capacity-indicator”than as a conventional transmit “level-sensitive” watermark mechanism.In another respect, the look-ahead watermark is a “top-down” capacityindicator versus a standard “bottom-up” watermark.

The look-ahead watermark has advantages and aids the processing of data.It allows a reduction or elimination of FIFO underflow errors. Itimproves the utilization of the direct memory access unit. It alsoexpedites frame transfer. It allows the earlier detection of a nextframe for transmission. It improves the utilization of expensive FIFOmemories and reduce network inter-frame gap timing “delays”. It alsoallows a reduction in the cycles per frame, i.e., microprocessorworkload, and allows efficiency enhancement for both small and largeframes. It is transparent to the host system and reduces the CPU contextswitching.

The look-ahead watermark allows the device (firmware/hardware statemachine) to “look” into the FIFO memory to determine if it can supportadditional bursts of data (of a known quantity) and henceeliminate/reduce one or more CPU context switches per frame. A secondDMA command can be enqueued with little additional overhead to move thenext frame burst to the destination FIFO.

FIG. 22 illustrates a conventional FIFO flow-control versus look-aheadwatermark. The drawing is an abstract portrayal of the basic concept ofa FIFO memory structure showing the system side and the network side.The transmit watermark is indicated at 260. The timing mechanism isshown on the bottom horizontal line and shows time with the data burstindicated at point 1 for a data burst X, and look-ahead watermark databurst Y at points 2 and 3. A look-ahead watermark timeline illustratesthe firmware look-ahead watermark check. In the conventional example,the FIFO is empty (data=0) and then the interrupt is generated and onedata burst then fills the FIFO such that the current data is X. With thefirmware look-ahead watermark check, the firmware submits a command tothe DMA for data transfer to the FIFO and the second data burst occursas shown by the numeral 2 and the current data becomes X+Y. The firmwarethen checks the look-ahead watermark and a third data burst occurs asindicated by the numeral 3 such that the current data becomes X+2Y.

As shown in the flow chart at FIG. 23, starting at block 300, the methodof the present invention for controlling data flow in a data-basednetwork using the network controller of the present invention with alook-ahead watermark is illustrated. At block 300, the DMA burst size isstored, as well as a look-ahead watermark burst size. The two burstsizes can be substantially the same or different. The channel is thenenabled. The watermark interrupt is then generated to the DMA at block302. At block 304, the firmware issues a data transfer command to theDMA. As part of this command, the firmware then requests the DMA toacknowledge via a request for end of command (REOC) when the task iscompleted: REOC=TRUE. At block 306, the DMA then arbitrates for theextension bus and then transfers data to the transmit FIFO. It signalsvia an EOC flag when it is finished.

A decision occurs at block 308 to determine if the DMA transfer iscomplete, which corresponds to EOC=TRUE. If the DMA transfer is notcomplete, then block 306 is repeated. If the DMA transfer is complete,the FIFO control logic determines the data capacity at block 310. Asillustrated, the FIFO control logic calculates the data capacity bysubtracting the current data value held within the FIFO from the maximumvalue that can be held within the FIFO. That result is then divided bythe look-ahead watermark burst size to obtain the data capacity. Asshown in block 312, if the data capacity is greater than or equal to 1,the look-ahead watermark value (such as a flag) is true. If thelook-ahead watermark value is less than 1, then it is false. If thelook-ahead watermark flag is true at block 314, then an additionalcommand is issued to the DMA at block 316, and the DMA transfers data tothe transmit FIFO at block 318. If the look-ahead watermark is false,then the routine terminates.

FIGS. 24 a and 24 b illustrate first an interrupt-mediated frametransmission (FIG. 24 a) and a look-ahead watermark-mediated frametransmission (FIG. 24 b). These timing mechanisms show the advantages ofthe look-ahead watermark and aids in quantifying the efficiency of thelook-ahead watermark in terms of the clock cycles. The charts show thestaggered delay of the interrupts, such as when they are issued andserviced and when data is written into the FIFO. This is important in abusy, multi-channel device to ensure that it is fully employed. This cancompare the latency of a standard interrupt with the look-aheadwatermark efficiency.

Interrupt-Mediated Frame Transmission (FIG. 24 a)

1. DMA initiates frame transmission via a start of packet interruptsignal (SOP).

2. Firmware (FW) enables the transmit channel, builds a command (two32-bit words) and submits this command to the DMA for execution.

3. DMA decodes the command, arbitrates for the external bus, readsappropriate data from external shared memory and writes this into theappropriate transmit FIFO memory.

4. After the DMA transfer completes and if the transmit watermark is notexceeded, then a continuation of packet (COP) interrupt will begenerated.

5. Once again the firmware constructs a command and issues it to the DMAfor execution.

6. If the firmware has not disabled the COP interrupt and data in theFIFO has not exceeded the standard watermark, then another COP may begenerated.

7. An “end of packet” (EOP) interrupt is generated once the terminalbyte of the frame is clocked out of the FIFO onto the network.

8. Firmware checks whether another frame is ready for transmission(i.e., chained).

9. In the event that a chained frame exists, a DMA command is thenconstructed and issued.

10. The first burst of the second frame is fetched from external RAM andwritten into the transmit FIFO memory.

11. Another COP is issued once the write burst terminates and if theFIFO WM is not exceeded.

12. Firmware builds a fourth command to initiate the second burst forthis second frame.

13. If the firmware has not disabled the COP interrupt and data in theFIFO has not exceeded the standard watermark, then another COP may begenerated.

14. An “end of packet” (EOP) interrupt is generated once the terminalbyte of the frame is clocked out of the FIFO onto the network.

15. Firmware checks whether another frame is ready for transmission(i.e., chained), and if this is not the case, disables the transmitchannel.

LAWM-Mediated Frame Transmission (FIG. 24 b)

1. DMA initiates frame transmission via a start of packet interruptsignal (SOP).

2. Firmware (FW) enables the transmit channels, builds a command (two32-bit words) and submits this command to the DMA for execution.

3. DMA decodes the command, arbitrates for the external bus, readsappropriate data from external shared memory and writes this into theappropriate transmit FIFO memory. If the LAWM signal indicatessufficient capacity exists within the FIFO for an additional burst, thenthe firmware will submit a second command to the DMA for execution.

4. After each DMA transfer completes and if the transmit watermark isnot exceeded, then a continuation of packet (COP) interrupt may begenerated.

5. An “end of packet” (EOP) interrupt may be generated once the terminalbyte of the frame is clocked out of the FIFO onto the network.

6. Firmware checks whether another frame is ready for transmission(i.e., chained).

7. In the event that a chained frame exists, a DMA command is thenconstructed and issued.

8. DMA decodes the third command, arbitrates for the external bus, readsappropriate data from external shared memory and writes this into theappropriate transmit FIFO memory. If the LAWM signal indicatessufficient capacity exists within the FIFO for an additional burst, thenthe firmware will submit a fourth command to the DMA for execution.

9. If the transmit watermark is not exceeded after each DMA transfer,then a continuation of packet (COP) interrupt may be generated.

10. An “end of packet” (EOP) interrupt may be generated once theterminal byte of the frame is clocked out of the FIFO onto the network.

11. Firmware checks whether another frame is ready for transmission(i.e., chained), and if this is not the case, disables the transmitchannel.

It is evident that the look-ahead watermark-mediated frame transmissionis advantageous and efficient and overcomes latency involved with priorart methods.

FIG. 25 shows a graph, illustrating watermark effects on interruptgeneration with regard to packet size. The graph plots the number ofgenerated interrupts as a function of FIFO watermark size. It can beobserved from the graph that with an increase in packet size, the numberof required interrupts also tends to increase. Watermark values have aninverse effect on the total number of generated interrupts. More oftenthan not, manipulation of the watermark alone is insufficient in tuningthe performance of a device. With high variability of network packetsizes and contention for shared system resources, an additionalmechanism is desired. The look-ahead watermark of the present inventionis such a mechanism and as such can be readily observed to depress thecurves in FIG. 25.

III. Early Congestion Notification

The present invention also uses an early congestion notification signalor interrupt (ECN) for advanced host notification of congestion in acorresponding port receiver, such as one of the receive FIFOs 70. Theterm “advanced” can be used because earlier received frames may still bestored in the FIFO ahead of the errored frame. There could be anywherefrom zero to a score of frames waiting to be dispatched, depending onthe relative sizes of the FIFO and the sizes of the frames. Hence, thereis potentially a significant delay between when an early congestionnotification (ECN) is first signaled and the errored frame is processed.Previously, the host 44 was not aware of this type of error until itsprocessing circuitry worked its way through the preceding frames andexamined the status word of each and every frame until it came to theill-fated frame. Because the host processor 44 was not aware of theoverflow problem, its processing behavior continued to proceedunmodified and, therefore, numerous exceeding frames continued tooverflow the FIFO and were therefore lost. This, of course, created amuch greater demand on the upper level software to retransmit framesand, thus, create bandwidth problems in the network. Instead of a singledownstream node with a lost frame problem, the situation rapidlydeveloped into one where many downstream nodes were forced to reclocktheir transmit windows, easily exacerbating the problem.

In accordance with the present invention, as shown in FIG. 26 flowchart, a method for controlling network data congestion in the receiveFIFO memory includes the step of generating a status error indicatorwithin a receive FIFO memory indicative of a frame overflow within theFIFO memory (block 340). An early congestion interrupt is then generatedfrom the FIFO memory to a communications processor in response to thestatus error indicator (block 342). The interrupt is processed and atleast one early congestion notification bit is set within a masterinterrupt register (MIR) of the direct memory access unit (block 344).

An early congestion interrupt is then generated from the direct memoryaccess unit to the host processor indicative that a frame overflow hasoccurred within the FIFO memory (block 346). Instructions are generatedfrom the host processor to the FIFO memory to discard the incoming framethat has caused the frame overflow (block 348). The services of receivedframes can be enhanced by one of either increasing the number of wordsof a direct memory access (DMA) unit burst size, or modifying thetime-slice of other active processes (block 350).

FIGS. 27A-G show a high level block overview of the early congestionnotification method of the present invention. FIG. 27A indicates thatthe receive FIFO is empty and the read (RD) and write (WR) pointers arethe same at 0,0. Data then begins to come in and the read pointer is atzero and the write pointer is advancing, as indicated in FIG. 27B. Asthe packet is received, the status is written in as indicated by theStat 1. A second frame or packet arrives (Data 2) and begins to overflow(FIGS. 27C and 27D). When the overflow condition occurs, a flip-flop isset for an error, thus an overflow bit is set (FIG. 27G). At this point,the early congestion notification (ECN) is sent out. The write pointeris reset to the beginning of packet to and frozen until the end ofpacket occurs, at which the time error status field of low packet isentered. The read of the status 1 by the DMA copies it into the receivestatus register at the host address. No request of the DMA for anotherdata transfer will occur until the communications processor reads thestatus. This prevents overriding of status register by the overflowstatus (FIGS. 27E and 27F).

Referring now more particularly to FIGS. 28-43, a more detaileddescription occurs with three incoming different packets where themethod and apparatus of the present invention are illustrated. FIG. 28shows the network controller and host system where no data has beenreceived within the receive FIFO 72. In FIG. 29, data is first enteringthe receive FIFO 72, and in FIG. 30, the watermark 258 is reached and astart-of-packet interrupt is sent to the communications processor 92 viathe interrupt bus 252. The communications processor 92 issues a commandto the DMA 85 to transfer data (FIG. 31). At the same time, data iscontinuing to enter the receive FIFO 72 as indicated by the arrow.

As shown in FIG. 32, the DMA negotiates for ownership of the system bus42 with the bus arbitration logic unit 47, while data continues totransfer into the receive FIFO memory 72. In FIG. 33, the DMA 85transfers data from the receive FIFO 72 to the shared system memory 46.As shown in FIG. 34, a second packet or frame then enters the receiveFIFO memory 72. FIGS. 35, 36 and 37 are similar to FIGS. 30, 31 and 32,except that access to the system bus 42 has been denied. At this time, athird packet (dark shading) is entering (FIG. 38) in with the secondpacket (diagonal line shading). In FIG. 39, the incoming frame overflowsthe receive FIFO memory 72 and the internal interrupt is sent to thecommunications processor 92 after an early congestion notification (ECN)bit has been set (FIG. 27G). In FIG. 41, the communications processor 92then sets the ECN bits for the port in the appropriate register block ofthe DMA 85. In FIG. 42, the DMA 85 signals the early congestioninterrupt along the system bus 42 to the host processor 44 and the DMA85 then transfers data from the receive FIFO 72 to the shared systemmemory 46, as shown in FIG. 43. The third frame is lost. However, theupper level software can then transmit the frame.

IV. Fence Posting

Reference should once again be placed in greater detail above concerningthe discussion of descriptor rings 202 and descriptors 206, referringonce again to FIGS. 3, 4, 5 and 7. In addition to the graph of FIG. 44,it is evident that the present method and apparatus controls thetransfer of data arranged in frames between the host 44 and networkcontroller 40. Both share the system memory 46. In accordance with thepresent invention, only the first and last descriptors 206 are updatedwithin a descriptor “chain” to enhances bus utilization and grantownership of first and last descriptors and any intermediate descriptorsto the desired host or controller.

As noted before, the host 44 can elect to use frame data buffers 204which are smaller in size than the frames that have been received ortransmitted and, thus, a single frame data buffer could span multipleframe data buffers 204. This would allow frames to be dissected orassembled by the network controller 40. Naturally, as noted above,multiple frame data buffers 204 could hold the constituent pieces of theframe by “chaining” the associated descriptors 206 together andconsecutive entries in the descriptor ring 202 with the end-of-frameflag set in the last descriptor of the chain. The respective frame databuffer of a descriptor entry 206, which is owned but whose end-of-frameflag is not set, is considered to be part of a frame and not an entireframe. The controller 40 can chain descriptors 206 together one-by-oneas it fills each successive frame data buffer 204. When the end of aframe is finally received and transferred to the external shared memory46, the end-of-frame flag is set in the last descriptor of thedescriptor chain (FIG. 4).

During transmission, the controller 40 is able to sequentially constructa single frame and the contents of “chained” frame data buffers 204,which are naturally pointed to by the “chained” descriptors 206.Transmission of the frame terminates only when it encounters a framedata buffer 204 whose descriptor 206 has set the end-of-frame flag. Thisgreat improvement in bus utilization is brought about by the presentinvention where instead of the prior art of successively updating eachspanned descriptor 206, only the first and last descriptors are altered,such as by updating the ownership bit within the descriptor for networkreceived frames. These first and last updated descriptors form the“fence-posts” of the chain.

All the flags and fields of the first and last descriptor in a“fence-posted” chain are updated in order to provide accurateinformation about a frame once it has been fully transmitted orreceived. For example, for received frames, the message size field 218of the first descriptor in the chain is updated with the byte count ofthe entire frame, not simply the byte count of the associated bufferbecause this is equal to the buffer size.

As noted above, FIG. 4 illustrates the administration block 200 with thechip initialization section 200 a, and the four ports with thestatistics image 200 b-e. The descriptor ring 202 is shown with thevarious descriptors 206, that point to frame data buffers usingaddresses. A frame data buffer is shown at the right. FIG. 5 shows aframe data buffer 204 with a descriptor 26 as a two-word entry, with anownership bit (OB) 212 and end-of-packet (EOP) 214. The buffer size 216and message size 218 is contained in the one word 208, and the bufferaddress 219 in the other word 210. The graph in FIG. 44 illustrates indetail that the use of only the first and last descriptors as explainedabove creates a flat line to reduce traffic along the bus.

FIG. 3 also illustrates in detail how the administration block 200 haspointers 200 d (FIG. 7) which directly points to the different transmitrings 202, having the descriptors 206 with the buffer information 206 a,such as geometry, and buffer addresses 206 b.

V. Creation of the Descriptor Rings

The present invention is advantageous because the network device nowassumes responsibility for the creation of the data and bufferstructures, such as the descriptor rings. The network device 40constructs transmit and/or receive descriptor rings 202 (FIG. 3) inexternally shared memory 46. In the present invention, support isprovided for full-duplex channels. The parameters dictating the numberof descriptors in either the transmit or receive descriptor rings 202and their respective frame data buffer dimensions are communicated via aparameter block (or administration block).

This administration block 200 is exchanged between a host system 43 andnetwork device 40 at initialization (FIG. 45) via a communicationprimitive under host control. This administration block 200 is stored(or mapped) into numerous variable fields of the memory 46. As notedabove, if the field values for the transmit descriptor ring size orreceive descriptor ring size are non-zero, then construction can beinitiated. Otherwise, in the event the fields are zero, the networkdevice 40 will not build the associated descriptor rings 202. Thenetwork device 40 expects the host 43 to have already built the data andmemory structures in the shared memory 46. The geometry or length of thedescriptor ring 202 and the sizes of the associated frame data buffers204 varies and the descriptor rings 202 often vary from 50 to 500descriptors in length, while the frame data buffers 204 vary from about256 bytes up to about 2,000 or 5,000 bytes. Frame data buffer size isselected based upon the maximum supported frame size of interfacingnetworks. The overall memory allocated per port 50-56 is in the twomegabyte range.

The frame data buffer size has relatively little effect on the timerequired to actually build the descriptor rings 202. However, thedescriptor ring size is the limiting factor for the construction time. Ablock-mode construction optimization technique is used to reduce thebuild time. Descriptors 206 can be built on-chip in blocks of two andtransferred to external memory 46 via the direct memory access unit 85.

This block size is alterable and could be easily included within theparameter of blocks in the future. The method and network device of thepresent invention offers advantages to the market, including a reducedtime required for host software development, and a size reduction of ahost code. There can be expedited testing and faster network deviceinitialization. Also, the present invention expedites systemimplementation for application design engineers.

In accordance with the present invention, a block of memory within theshared memory 46 is allocated by the host system 43, which maps theadministration block 200 having the descriptor ring parameters 200 b asnoted before (FIG. 7). These parameters include the geometry of thedescriptor ring 202 and descriptors 204 to be formed within the sharedmemory. FIG. 7 shows the administration block and indicates that at fouraddresses PAD+60 to PAD+72, the buffer size, the transmit ring size, andreceive ring size.

As shown in FIG. 45, the administration block 200 has the base pointerset up at point 0 on the chart. The host system 43 issues a primitivefor initialization (INIT at point 1) to the network device. At the sametime, the host 44 writes into the network device 40 the base address ofthe administration block 200. The network device 40 then “fetches” orreads the administration block from the shared memory (point 2) and thensends an acknowledgment (ACK) back to the host that the administrationblock is received. This administration block is processed, while thehost system may conduct additional housekeeping (point 3) afterreceiving the acknowledgment.

As the administration block 200 is processed, the network device 40constructs corresponding descriptors as blocks of data that point to theframe data buffers to be formed within shared memory.

FIG. 46 shows in greater detail a flow chart that illustrates how thedescriptors can be formed by the network device. The host provides thepointers to the base descriptor rings and associated buffers in block400. As noted before, if the field values for the transmit ring size orreceive ring size fields are non-zero, then construction is immediatelyinitiated. Otherwise, in event these fields are zero, the network devicewill not build the associated descriptor rings, but expects the host tohave already built the structures in shared memory.

The administration block is read by the network device (block 402) and adescriptor header word is built (block 404). The descriptor addresswords are built (block 406) and the descriptor address updated block408). The buffer point address is also updated (block 410) and then thedescriptor block is read out by the network device to the host RAM whichis part of the shared system memory (block 412).

Then the process is tested to see if it is completed (block 414) and ifnot, then the descriptor addresses are updated again. If the process iscompleted, then the EOR bit is set for the terminal descriptor (block416) and the terminal descriptor written out to the host of RAM (block418). The process then ends (block 420).

There are a number of assumptions, such as the use of contiguousdescriptors, and an even count. Typically, the buffers are contiguousand of uniform size. If the buffer pointers are not provided, then thefirmware 102 will start buffers at a two-word offset from the calculatedtermination of a descriptor ring. If the administration block descriptorparameter hexadecimal word is “0X00000000,” then no associateddescriptor rings 202 will be built. The administration block transfer isrequired prior to other configuration primitives because the block willoverwrite the settings. All descriptor ring dimensions must be evenvalues and the frame data buffer size can be a 0 or 1 or no descriptorring 202 will be built. All buffer pointers are forced to awardalignment regardless of the ring dimensions. The smallest descriptorring that can be built is three descriptors in size and two descriptorsper block with one block per DMA transfer.

FIGS. 47-50 illustrate a table showing further details of the transmitand receive message descriptors, as well as the various fields and bitvalues that can be used.

Other disclosures that are related to the present invention are setforth in patent applications entitled, “METHOD AND SYSTEM OF CONTROLLINGTRANSFER OF DATA BY UPDATING DESCRIPTORS IN DESCRIPTOR RINGS,”“LOOK-AHEAD WATERMARK FOR ADDITIONAL DATA BURST INTO FIFO MEMORY,”“METHOD AND APPARATUS FOR CONTROLLING NETWORK DATA CONGESTION,” and“METHOD AND NETWORK DEVICE FOR CREATING BUFFER STRUCTURES IN SHAREDMEMORY,” which are filed on the same date and by the same assignee, thedisclosures which are hereby incorporated by reference.

Many modifications and other embodiments of the invention will come tothe mind of one skilled in the art having the benefit of the teachingspresented in the foregoing descriptions and the associated drawings.Therefore, it is to be understood that the invention is not to belimited to the specific embodiments disclosed, and that themodifications and embodiments are intended to be included within thescope of the dependent claims.

1. A method of routing network-based data arranged in frames comprisingthe steps of: receiving a first portion of a frame within a memory of anetwork device, wherein the first portion of the received frame includesdata having preselected address fields; transferring a burst of dataafter receiving a start-of-packet interrupt, including preselectedaddress fields, from the memory to an external shared system memory thatexists between the network device and a host processor; generating aninterrupt signal to the host processor indicative that the preselectedaddress fields of the frame are present in the shared system memory; andinitiating within the host processor an address and look-up algorithm inaddress tables to determine frame routing based on the preselectedaddress fields.
 2. A method of routing according to claim 1, and furthercomprising the step of transferring data from the memory through adirect memory access unit of the network device.
 3. A method of routingaccording to claim 2, and further comprising the step of generating aninterrupt signal to the host processor from the direct memory accessunit after the direct memory access unit has transferred data to theshared system memory.
 4. A method of routing according to claim 1, andfurther comprising the step of selecting the amount of data to betransferred from the memory based on the desired address fields to beanalyzed by the host processor.
 5. A method of routing according toclaim 1, and further comprising the step of receiving the balance of theframe completely within the shared system memory.
 6. A method of routingaccording to claim 5, and further comprising the step of generating anend-of-frame interrupt when a frame has been completely received withinthe shared system memory.
 7. A method of routing according to claim 1,and further comprising the step of generating a start-of-packetinterrupt to a communications processor within the network device whenthe data received within the memory has reached a desired watermarkvalue.
 8. A method of routing according to claim 7, and furthercomprising the step of issuing a command to a direct memory access unitof the network device to transfer data from the memory to the sharedsystem memory after the communications processor has received thestart-of-packet interrupt.
 9. A method of routing according to claim 8,and further comprising the step of arbitrating use of a system busbetween the direct memory access unit and a bus arbitration unit.
 10. Amethod of controlling network data flow arranged in frames comprisingthe steps of: receiving at least a first portion of a frame containingdata within a memory of a network device, wherein the first portion ofthe received frame includes data having preselected address fields;transferring a burst of data after receiving a start-of-packetinterrupt, including preselected address fields, from the memory to ashared system memory that exists between a host processor and thenetwork device; and generating an interrupt signal to the host processorindicative that the preselected address fields of the frame are presentin the memory.
 11. A method according to claim 10, and furthercomprising the step of transferring data from the memory through adirect memory access unit.
 12. A method according to claim 11, andfurther comprising the step of generating an interrupt signal to thehost processor from the memory after the direct access memory unit hastransferred data to the shared system memory.
 13. A method according toclaim 10, and further comprising the step of selecting the amount ofdata to be transferred from the memory based on the desired addressfields to be analyzed by the host processor.
 14. A method according toclaim 10, and further comprising the step of receiving the balance ofthe frame completely within shared system memory.
 15. A method accordingto claim 10, and further comprising the step of generating anend-of-frame interrupt when a frame has been completely received withinshared system memory.
 16. A method according to claim 10, and furthercomprising the step of generating a start-of-packet interrupt to acommunications processor when the data received within the memory hasreached a desired watermark value.
 17. A method according to claim 10,and further comprising the step of issuing a command to a direct memoryaccess unit of the network device to transfer data from the memory tothe shared system memory after the communications processor has receivedthe start-of-packet interrupt.
 18. A method according to claim 10, andfurther comprising the step of arbitrating use of a system bus betweenthe direct memory access unit and a bus arbitration unit.
 19. A methodof routing network-based data arranged in frames comprising the stepsof: receiving at least a first portion of a frame within a memory of anetwork device, wherein the first portion of the received frame includesdata having preselected address fields; selecting the amount of data tobe transferred from the memory based on the desired address fields to beanalyzed by a host processor; transferring a burst of data, includingpreselected address fields after receiving a start-of-packet interrupt,from the memory to a shared system memory that exists between thenetwork device and the host processor; generating an interrupt signalfrom the network device to the host processor indicative that thepreselected address fields of the frame are present in the shared systemmemory; and initiating an address and look-up algorithm to determineframe routing based on the preselected address fields.
 20. A method ofrouting according to claim 19, and further comprising the step oftransferring data from the memory through a direct memory access unit ofthe network device.
 21. A method of routing according to claim 20, andfurther comprising the step of generating an interrupt signal to thehost processor after the direct access memory unit has transferred datato the shared system memory.
 22. A method of routing according to claim19, and further comprising the step of receiving the balance of theframe completely within the shared system memory.
 23. A method ofrouting according to claim 22, and further comprising the step ofgenerating an end-of-frame interrupt when a frame has been completelyreceived within shared system memory.
 24. A method of routing accordingto claim 19, and further comprising the step of generating astart-of-packet interrupt to a communications processor of the networkdevice when the data received within the memory has reached a watermarkvalue.
 25. A method of routing according to claim 24, and furthercomprising the step of issuing a command to a direct memory access unitof the network device to transfer data from the memory to the sharedsystem memory after receiving the start-of-packet interrupt.
 26. Amethod of routing according to claim 19, and further comprising the stepof arbitrating use of a system bus between the direct memory access unitand a bus arbitration unit of the network device.
 27. A system forrouting network-based data arranged in frames comprising: a memory of anetwork device for receiving at least a first portion of a frame,wherein the first portion of the frame includes data having preselectedaddress fields; a host processor; a shared system memory that existsbetween the network device and host processor for receiving data,including the preselected address fields, from the memory; a directmemory access unit for transferring a burst of data from the memory tothe shared system memory; and a communications processor for selectingthe amount of data to be transferred from the memory to the sharedsystem memory based on the desired address fields to be analyzed by thehost processor after receiving a start-of-packet interrupt.
 28. A systemaccording to claim 27, and further comprising an interrupt bus connectedbetween the memory and communications processor, wherein said memoryincludes an interrupt generator for generating an interrupt to thecommunications processor along the bus.
 29. A system according to claim27, and further comprising a bus between the direct memory access unitand the memory on which data is transferred from the memory and throughthe direct memory access unit to the shared system memory.
 30. A systemaccording to claim 27, and further comprising a controller bus connectedbetween the communications processor and the direct memory access unitthrough which data transfer commands are issued from the communicationsprocessor to the direct memory access unit to transfer data.
 31. Asystem according to claim 27, wherein said memory has a watermark value,and means for issuing a start-of-packet interrupt to the communicationsprocessor when the watermark value is reached.
 32. A system for routingnetwork-based data arranged in frames comprising: a host processor foranalyzing transferred bursts of data and initiating an address andlookup algorithm for dispatching a frame to a desired destination; ashared memory for receiving data, including any preselected addressfields; and a network device having: a plurality of ports, each portincluding a memory for receiving at least a first portion of a frame,wherein the first portion of the frame includes data having preselectedaddress fields; a direct memory access unit for transferring a burst ofdata from the memory to the shared system memory; and a communicationsprocessor for selecting the amount of data to be transferred from thereceive memory based on the desired address fields to be analyzed by thehost processor after receiving a start-of-packet interrupt.
 33. A systemaccording to claim 32, and further comprising an interrupt bus connectedbetween the memory and communications processor, wherein said portsinclude an interrupt generator for generating an interrupt to thecommunications processor along the bus.
 34. A system according to claim32, and further comprising a bus connected between the direct memoryaccess unit and the memory on which data is transferred from the memoryand through the direct memory access unit to the shared system memory.35. A system according to claim 32, and further comprising a controllerbus connected between the communications processor and the direct memoryaccess unit through which data transfer commands are issued from thecommunications processor to the direct memory access unit to transferdata.
 36. A system according to claim 32, wherein said receive memoryhas a watermark setting at which the port issues a start-of-packetinterrupt to the communications processor.
 37. A system according toclaim 32, wherein said memory comprises a first-in/first-out (FIFO)receive memory.